<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- DataTables CSS -->
<link rel="stylesheet" href="resources/mytheme/css/style.css">
<link rel="stylesheet" type="text/css"
	href="//cdn.datatables.net/1.10.0/css/jquery.dataTables.css">
<!-- jQuery -->
<script type="text/javascript" charset="utf8"
	src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<!-- DataTables -->
<script type="text/javascript" charset="utf8"
	src="//cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('#userQueueReport').dataTable();
	});
</script>
</head>
<body>
<div id=header2>

	<div id="logo">
		<img src="resources/mytheme/Logo.png" alt="RentFlix">
	</div>
	
	<div id="searchNav">
		<form name="inputForm" method="get">
			
			<br>
			
		</form>
	</div>
	
	<div id="loginBar">
		<ul>
		<li><a class="lastlink" href="logout">Logout</a></li>
		<li><a class="lastlink" href="http://localhost:8080/MovieProject">Home</a> </li>
		
		
				
				<li><a href="reports">Admin: In-Stock</a> </li>
				<li><a href="userQueues">Admin: Queues</a> </li>
				<li><a href="popularMovieReport">Admin: Popular Movies</a> </li>
				<li><a href="newMovie">Admin: Add Movie</a> </li>
				<li><a href="CheckInRentals">Admin: Check-In</a> </li>
				
		</ul>
	</div>
	
</div>
<h1>-----------------------------</h1>

	<h1>Users and their Queues</h1>
	<table id="userQueueReport" class="display">
		<thead>
			<tr>
				<th>User ID</th>
				<th>Name</th>
				<th>Position</th>
				<th>Movie Title</th>
			</tr>
		</thead>
		<tbody>
			<!-- pulls items from the Database into the rows of the table -->
			<c:forEach items="${userQueueReport}" var="row">
				<tr>
					<td>${row.user.userID}</td>
					<td>${row.user.firstName} ${row.user.lastName}</td>
					<td>${row.position}</td>
					<td>${row.movie.title}</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

	
</body>
</html>